package com.xy.modular.basics.service.impl;

import com.xy.framework.base.dao.IBaseDao;
import com.xy.framework.base.service.BaseServiceImpl;
import com.xy.framework.exceptions.ValidateParamException;
import com.xy.modular.basics.dao.UserDepMapper;
import com.xy.modular.basics.entity.user.UserDep;
import com.xy.modular.basics.service.IUserDepService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**
 * <p>
 * 服务实现类
 * </p>
 *
 * @author BCK
 * @since 2019-10-15
 */
@Service("userDepService")
public class IUserDepServiceImpl extends BaseServiceImpl<UserDep, String> implements IUserDepService {
	@Resource
	private UserDepMapper userDepMapper;

	@SuppressWarnings("rawtypes")
	@Override
	protected IBaseDao getBaseDao() {
		return this.userDepMapper;
	}

	@Override
	public void validateEntity(UserDep e) throws ValidateParamException {
		// TODO Auto-generated method stub

	}

	@Override
	public List<UserDep> findAllUser(String userId) {
		return userDepMapper.findAllUser(userId);
	}

	@Override
	public List<UserDep> findAlldep(String depId) {
		return userDepMapper.findAllDep(depId);
	}
}
